/**
 * @Author Yenchingcheng
 * @Date 2023/5/28 23:12
 * @Description 抽象工厂练习
 **/
// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {

        Factory factory1 = FactoryProducer.getFactory("fruit");
        Fruit apple = factory1.getFruit("apple");
        Fruit orange = factory1.getFruit("orange");
        Factory factory2 = FactoryProducer.getFactory("method");
        Method juice = factory2.getMethod("juice");
        Method salad = factory2.getMethod("salad");
        apple.eat();
        juice.eatMethod();
        orange.eat();
        salad.eatMethod();
    }
}